<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <link rel="stylesheet" href="../../../static/css/index.css">
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <title>添加车次</title>
</head>
    <body>
    <div>
        <div th:include="admin/navigation :: nav"></div>
    </div>
    <div class="col-lg-4 col-md-4 col-xs-4" >
        <div th:each="route : ${session.routes}">
            <p th:text="'Id : ' + ${route.getId()} + ' 起始站点 : ' + ${route.getStartStation()} + ' 最终站点 : ' + ${route.getEndStation()}"></p>
        </div>
    </div>
    <div class="col-lg-4 col-md-4 col-xs-4">
        <h1>添加车次</h1>
        <form action="/admin/addTrainNumber" method="post">
            <div class="form-group">
                <label for="routeId">选择列车路线</label>
                <select class="form-control" id="routeId" name="routeId">
                    <option th:each="route : ${session.routes}" th:value="${route.getId()}" th:text="'Id : ' + ${route.getId()} + ' 起始站点 : ' + ${route.getStartStation()} + ' 最终站点 : ' + ${route.getEndStation()}"></option>
                </select>
            </div>
            <div class="form-group">
                <label for="trainId">列车编号</label>
                <input type="text" name="trainId" class="form-control" id="trainId" placeholder="请输入列车编号">
            </div>
            <div class="form-group">
                <label for="startTime">出发时间</label>
                <input type="datetime-local" name="startTime" class="form-control" id="startTime">
            </div>
            <div class="form-group">
                <label for="endTime">到达时间</label>
                <input type="datetime-local" name="endTime" class="form-control" id="endTime" placeholder="请输入到达时间">
            </div>
            <div class="form-group">
                <label for="ticketNumber">票总数</label>
                <input type="number" name="ticketNumber" class="form-control" id="ticketNumber" placeholder="请输入票总数">
            </div>
            <button type="submit" class="btn btn-primary">添加</button>
        </form>
    </div>
    <div class="col-lg-4 col-md-4 col-xs-4">
    </div>
    </body>
</html>